<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <img src="img/1.jpg" id="im1">
    <script>
    document.getElementById("im1").onclick = function (){
        this.height = 200;
        this.width = 300;
    };

    </script>
</body>

</html>